package service

import (
	"context"
	"fmt"
	"grpc/basic/global"
	__ "grpc/basic/proto"
	"grpc/handle/model"
)

func (s *Server) ListReview(_ context.Context, in *__.ListReviewReq) (*__.ListReviewResp, error) {
	var review model.Review

	listReview, err := review.ListReview(global.DB)
	if err != nil {
		return nil, fmt.Errorf("审核列表查看失败")
	}

	return &__.ListReviewResp{
		Greet: "审核列表",
		List:  listReview,
	}, nil
}
